<template>
	<view>
		<view class='logo'>
		  <view class='div'>
			<view class='tops'>
			  <text class='t'>为了给您带来更加全面精准的资讯，请先完成登录哦！</text>
			</view>
			<view class='content'>
			  <button class='select-btn' :loading="is_loading"  open-type="getUserInfo" @getuserinfo='sendRequest'>{{text}}</button>
			</view>
		  </view>
		</view>    
	</view>
</template>

<script>
export default {
	data() {
		return {
			text:'',
			is_loading:false,
			login_type:''
		};
	},
	methods: {
		sendRequest(e) {
 
			if( this.login_type == "msg" ){
				uni.navigateTo({
					url:'/pages/user/login_msg/login_msg/login_msg'
				})
			}
			if( this.login_type == "wx" ){
				this.is_loading = true
				let user_info = e.detail;
				this.$emit('getUerInfoSucc', user_info, {});
			}
		
		}
	},
	onLoad() {
		//#ifdef APP-PLUS
			this.text = "短信验证登陆";
			this.login_type = "msg";
		//#endif
		//#ifdef MP-WEIXIN
			this.text = "微信一键登录";
			this.login_type = "wx";
		//#endif
		
	}
};
</script>

<style>
/* 登录框 */
.logo {
	height: 100%;
	background: rgba(43, 51, 62, 0.7);
	 
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	padding: 0 30rpx;
	color: #fff;
	z-index: 99;
}
.logo .div {
	width: 500rpx;
	border-radius: 30rpx;
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	overflow: hidden;
}
.logo .div .tops {
	background: #fff;
	color: #2b333e;
}
.logo .div .tops text {
	display: inline-block;
}
.logo .div .tops .t {
	font-size: 30rpx;
	line-height: 1.5;
	padding: 15px;
}
.logo .div .tops .t2 {
	font-size: 30rpx;
	margin: 25rpx 0 40rpx 0;
}
.logo .content {
	background: #2b333e;
	border-radius: 30rpx;
}
.logo .content .tit {
	font-size: 36rpx;
	text-align: center;
	line-height: 120rpx;
}
.logo .content text {
	display: block;
}
.logo .content .txt {
	font-size: 28rpx;
	line-height: 1.5;
}
.select-btns {
	position: absolute;
	width: 60rpx;
	height: 60rpx;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 40rpx;
	opacity: 0;
	z-index: 999999;
}
.select-btn {
	color: #fff;
	background: #2b333e;
	font-size: 30rpx;
	border-radius: 0;
	width: 100%;
	background: #1aad16;
	height: 90rpx;
	line-height: 90rpx;
}
.logo .close {
	width: 60rpx;
	height: 60rpx;
	display: block;
	margin: 0 auto;
	margin-top: 40rpx;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}
</style>
